package com.jvm123.excel.common;

import java.util.LinkedHashMap;
import java.util.Map;

import static com.jvm123.excel.common.Constants.*;

public class ExcelProperties {
    /**
     * 数据表sheet所在excel文件中的序号
     */
    private int sheetIndex = SHEET_INDEX;
    /**
     * 对应java中bean属性名称的行的序号
     */
    private int nameRowIndex = NAME_ROW_INDEX;
    /**
     * 对应每一列说明的行的序号（可无）
     */
    private int commentRowIndex = COMMENT_ROW_INDEX;
    /**
     * 要获取的数据开始行的序号
     */
    private int firstDataRowIndex = FIRST_DATA_ROW_INDEX;
    /**
     * 要获取的数据结束行的序号（可无）
     */
    private int lastDataRowIndex = LAST_DATA_ROW_INDEX;
    /**
     * 要获取的数据的条数（可无）
     */
    private int dataRowNum = DATA_ROW_NUM;
    /**
     * 数据开始列的序号
     */
    private int startColumnIndex = START_COLUMN_INDEX;

    /*
     * 导出的属性
     */

    /**
     * 是否显示字段名称
     */
    private boolean showNameRow = false;

    /**
     * 显示日期的格式
     */
    private String datePattern = DEFAULT_DATE_PATTERN;

    /**
     * 导出单元格的宽度
     */
    private int columnWidth = DEFAULT_COLUMN_WIDTH;
    /**
     * 字段名称与表头的对应关系
     */
    private LinkedHashMap<String, String> nameHeaderMap;

    private Map<String, Object> nameLocationMap;

    public int getSheetIndex() {
        return sheetIndex;
    }

    public void setSheetIndex(int sheetIndex) {
        this.sheetIndex = sheetIndex;
    }

    public int getNameRowIndex() {
        return nameRowIndex;
    }

    public void setNameRowIndex(int nameRowIndex) {
        this.nameRowIndex = nameRowIndex;
    }

    public int getCommentRowIndex() {
        return commentRowIndex;
    }

    public void setCommentRowIndex(int commentRowIndex) {
        this.commentRowIndex = commentRowIndex;
    }

    public int getFirstDataRowIndex() {
        return firstDataRowIndex;
    }

    public void setFirstDataRowIndex(int firstDataRowIndex) {
        this.firstDataRowIndex = firstDataRowIndex;
    }

    public int getLastDataRowIndex() {
        return lastDataRowIndex;
    }

    public void setLastDataRowIndex(int lastDataRowIndex) {
        this.lastDataRowIndex = lastDataRowIndex;
    }

    public int getDataRowNum() {
        return dataRowNum;
    }

    public void setDataRowNum(int dataRowNum) {
        this.dataRowNum = dataRowNum;
    }

    public int getStartColumnIndex() {
        return startColumnIndex;
    }

    public void setStartColumnIndex(int startColumnIndex) {
        this.startColumnIndex = startColumnIndex;
    }

    public boolean isShowNameRow() {
        return showNameRow;
    }

    public void setShowNameRow(boolean showNameRow) {
        this.showNameRow = showNameRow;
    }

    public String getDatePattern() {
        return datePattern;
    }

    public void setDatePattern(String datePattern) {
        this.datePattern = datePattern;
    }

    public LinkedHashMap<String, String> getNameHeaderMap() {
        return nameHeaderMap;
    }

    public void setNameHeaderMap(LinkedHashMap<String, String> nameHeaderMap) {
        this.nameHeaderMap = nameHeaderMap;
    }

    public int getColumnWidth() {
        return columnWidth;
    }

    public void setColumnWidth(int columnWidth) {
        this.columnWidth = columnWidth;
    }

    public Map<String, Object> getNameLocationMap() {
        return nameLocationMap;
    }

    public void setNameLocationMap(Map<String, Object> nameLocationMap) {
        this.nameLocationMap = nameLocationMap;
    }
}
